package org.luxor.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.luxor.commons.core.utils.DateUtils;
import org.luxor.commons.core.validator.group.UpdateGroup;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;


/**
 * 系统验证码
 *
 * @author Mark @date 2020-07-28 14:29:26
 */
@Data
@TableName("tb_sys_captcha")
@ApiModel(description = "系统验证码")
public class SysCaptchaEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键Id")
	@NotBlank(message = "uuid，不能为空", groups = UpdateGroup.class)
	private String uuid;

	@ApiModelProperty(value = "验证码")
	@NotBlank(message = "code，不能为空")
	private String code;

	@ApiModelProperty(value = "过期时间")
	@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN, timezone = "GMT+8")
	private Date expireTime;

	@ApiModelProperty(value = "是否启动(1-启用；0-禁用)")
	private Boolean enabled;

	@ApiModelProperty(value = "逻辑删除(1-删除；0-未删除)")
	private Boolean deleted;

}
